package gameStructure;

import java.util.ArrayList;
import java.util.Vector;

/**
 * class StateHolder.java
 * Auti h class krataei tin trehousa katastasi tou paihnidiou
 * @author rafael
 */



public class StateHolder{
    /**
     * Krataei oles tis koiniseis pou ginontai sti skakiera se ena Board ArrayList 8x8.
     * To currentState kratei ton arithmo tis kinishs pou vrisketai to paihnidi me 
     * tin 0 na einai h arhiki thesi ton pieces sti skakiera
     */
    public int currentState;
    public Vector<Move> State;
    public ArrayList Board;
    
    
    /**
     * Arhikopoiei kai stinei tin skakiera Board, to istoriko State kai tin metavliti
     * currentState.
     */
    public StateHolder(){}
    
    /**
     * Apothikeuei tin trehousa kinisi tou paihtei, apothikeuontas to stigmiotipo
     * tis kinisis Move sto Vector, kai 
     * auxanontas to currentState kata 1 (to currentState hrisimeuei pio poli mono kai 
     * mono sti diadikasi tou previous kai tou next).
     * Precondition: H kinisi na einai egiri.
     * Postcondition: Epistrefei ena Board ArrayList 8x8 me tin torini katastasi tou paihnidiou.
     * @param kinisi To move tou paihti pou tha siblirothei sto istoriko kai sti skakiera.
     */
    public ArrayList TocurrentState(Move kinisi){
        ArrayList pok= new ArrayList();
        
        return pok;
    }
    
    /**
     * Precondition: Prepei na ehei paihtei apo kapoion paihti toulahiston mia kinisi, oste
     * na iparhei dinatotita na girisoume mia katastasi pros ta piso
     * Postcondition: Na simplirothei to Board me tis prigoumenes
     *  kiniseis kapoias  katastasis tou paihnidiou
     * @return Epistrefei to Board me proigoumeni katastasi tou paihnidiou apo auti pou,
     * vrisketai tora to paihnidi.
     */
    public ArrayList previousState(){
        ArrayList pok= new ArrayList();
        
        return pok;
    }
    
    /**
     * Precondition: Prepei na ehei paihtei apo kapoion paihti toulahiston mia kinisi, oste
     * na iparhei dinatotita na girisoume mia katastasi pros ta piso 'h kai perissoteres, kai apo tis
     * proigoumenes katastaeis pou vriskomaste na pame se kapoia epomeni.
     * Postcondition: Na simpirothei to Board me tis epomenes
     *  kiniseis kapoias  katastasis tou paihnidiou
     * @return Epistrefei to Board me epomeni katastasi tou paihnidiou apo auti pou,
     * vrisketai tora to paihnidi.
     */
    public ArrayList nextState(){
        ArrayList pok= new ArrayList();
        
        return pok;
    }
}



